﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TiXian.aspx.cs" MasterPageFile="~/Manageweb/MemberMaster.master"
    Inherits="Manageweb_TiXian_TiXian" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>提现申请</title>

    <script type="text/javascript" src="../Jquery/jquery.min.js"></script>
    <script type="text/javascript">dateFormat='yyyy-mm-dd'</script>
    <script src="../../js/popcalendar.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        //检查交易数量
        function CheckCount(source, args) {
            var count = args.Value;

            var regex = /^[0-9]+(.[0-9]{2})?$/i;

            if (count == '') {
                $('#' + source.id).html('*必填');
                args.IsValid = false;
                return;
            }

            if (!regex.test(count)) {
                $('#' + source.id).html('格式错误!必须为正整数.');
                args.IsValid = false;
                return;
            }
            args.IsValid = true;
        }
    </script>


    <script language="javascript" type="text/javascript">
    function jisuan()
    {
        var dMaoMoney = document.getElementById('<%=txtMaoMoney.ClientID%>').value;
        var dFei = dMaoMoney*document.getElementById('<%=HiddenField1.ClientID%>').value;
        document.getElementById('<%=txtFei.ClientID%>').value=Math.round(dFei);
        document.getElementById('<%=txtMoney.ClientID%>').value= Math.round(dMaoMoney - dFei);

    }
    </script>

    <style type="text/css">
        .style1
        {
            width: 420px;
            height: 441px;
        }
    </style>

      <style type="text/css">
        *
        {
            margin: 0;
        }
        body
        {
            font-size: 9pt;
        }
        #container div
        {
            margin-top: 6px;
        }
        #select_city h3
        {
            float: left;
        }
        #main_city, #all_province
        {
            clear: both;
        }
        #main_city div, #all_province div
        {
            width: 588px;
            clear: left;
        }
        #main_city h4, #all_province h4
        {
            float: left;
            display: inline;
            font-size: 16px;
        }
        #main_city div span, #all_province div span
        {
            margin: 0 9px;
            cursor: pointer;
            font-size: 14px;
        }
        #float_lay
        {
            width: 220px;
            height: 122px;
            border: 1px #787878 solid;
            position: absolute;
            background: #fff;
            z-index: 999;
            display: none;
        }
    </style>

    <script src="../../js/JsMasked.js" type="text/javascript"></script>

    <script type="text/javascript">
        var ServerKey = '<%=StrKey %>';
        var hidMiYao = '<%=hidMiYao.ClientID %>';
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="divTiXian" style="padding-top: 8px; margin: 0 auto;" runat="server" visible="false">
        <table cellpadding="0" cellspacing="0" class="style1">
            <tr style="width: 80px">
                <td style="width: 80px">
                    会员帐号:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtAccount" runat="server" ReadOnly="True" Width="100%"></asp:TextBox></td>
            </tr>
            <tr style="width: 80px">
                <td style="width: 80px">
                    用户名:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:Label ID="Label2" runat="server" Text="Label"><%=UserName%></asp:Label>
                </td>
            </tr>
            <tr style="width: 80px">
                <td style="width: 80px">
                    银行名称:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:DropDownList ID="DDLBank" runat="server" Width="100%">
                        <asp:ListItem>中国人民银行</asp:ListItem>
                        <asp:ListItem>中国工商银行</asp:ListItem>
                        <asp:ListItem>中国农业银行</asp:ListItem>
                        <asp:ListItem>中国建设银行</asp:ListItem>
                        <asp:ListItem>中国银行</asp:ListItem>
                        <asp:ListItem>中国光大银行</asp:ListItem>
                        <asp:ListItem>中国民生银行</asp:ListItem>
                        <asp:ListItem>上海交通银行</asp:ListItem>
                        <asp:ListItem>招商银行</asp:ListItem>
                        <asp:ListItem>中信银行</asp:ListItem>
                        <asp:ListItem>华夏银行</asp:ListItem>
                        <asp:ListItem>兴业银行</asp:ListItem>
                        <asp:ListItem>上海浦东发展银行</asp:ListItem>
                        <asp:ListItem>深圳发展银行</asp:ListItem>
                        <asp:ListItem>浙商银行</asp:ListItem>
                        <asp:ListItem>恒丰银行</asp:ListItem>
                        <asp:ListItem>广东发展银行</asp:ListItem>
                    </asp:DropDownList></td>
            </tr>
            <tr style="width: 80px">
                <td style="width: 80px">
                    省 &nbsp;&nbsp; 份:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:DropDownList ID="ddl_area" runat="server" Width="100%">
                        <asp:ListItem Value="北京市">北京市</asp:ListItem>
                        <asp:ListItem Value="上海市">上海市</asp:ListItem>
                        <asp:ListItem Value="天津市">天津市</asp:ListItem>
                        <asp:ListItem Value="重庆市">重庆市</asp:ListItem>
                        <asp:ListItem Value="河北省">河北省</asp:ListItem>
                        <asp:ListItem Value="山西省">山西省</asp:ListItem>
                        <asp:ListItem Value="内蒙古自治区">内蒙古自治区</asp:ListItem>
                        <asp:ListItem Value="辽宁省">辽宁省</asp:ListItem>
                        <asp:ListItem Value="吉林省">吉林省</asp:ListItem>
                        <asp:ListItem Value="黑龙江省">黑龙江省</asp:ListItem>
                        <asp:ListItem Value="江西省">江西省</asp:ListItem>
                        <asp:ListItem Value="浙江省">浙江省</asp:ListItem>
                        <asp:ListItem Value="江苏省">江苏省</asp:ListItem>
                        <asp:ListItem Value="安徽省">安徽省</asp:ListItem>
                        <asp:ListItem Value="福建省">福建省</asp:ListItem>
                        <asp:ListItem Value="山东省">山东省</asp:ListItem>
                        <asp:ListItem Value="河南省">河南省</asp:ListItem>
                        <asp:ListItem Value="湖北省">湖北省</asp:ListItem>
                        <asp:ListItem Value="湖南省">湖南省</asp:ListItem>
                        <asp:ListItem Value="广东省">广东省</asp:ListItem>
                        <asp:ListItem Value="广西自治区">广西自治区</asp:ListItem>
                        <asp:ListItem Value="海南省">海南省</asp:ListItem>
                        <asp:ListItem Value="四川省">四川省</asp:ListItem>
                        <asp:ListItem Value="贵州省">贵州省</asp:ListItem>
                        <asp:ListItem Value="云南省">云南省</asp:ListItem>
                        <asp:ListItem Value="西藏自治区">西藏自治区</asp:ListItem>
                        <asp:ListItem Value="陕西省">陕西省</asp:ListItem>
                        <asp:ListItem Value="甘肃省">甘肃省</asp:ListItem>
                        <asp:ListItem Value="宁夏自治区">宁夏自治区</asp:ListItem>
                        <asp:ListItem Value="新疆自治区">新疆自治区</asp:ListItem>
                        <asp:ListItem Value="香港">香港</asp:ListItem>
                        <asp:ListItem Value="澳门特别行政区">澳门特别行政区</asp:ListItem>
                        <asp:ListItem Value="中国台湾">中国台湾</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width: 80px">
                    分 &nbsp;&nbsp; 行:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtBankfen" runat="server" Width="180px">

                    </asp:TextBox></td>
                <td>
                    <span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="RFV_Bankfen"
                        runat="server" ControlToValidate="txtBankfen" Display="Dynamic" ErrorMessage="必填字段"
                        ValidationGroup="g" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td style="width: 80px">
                    银行帐号:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtBackCode" runat="server" Width="180px"></asp:TextBox></td>
                <td>
                    <span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="RFV_BankCode"
                        runat="server" ControlToValidate="txtBackCode" Display="Dynamic" ErrorMessage="必填字段"
                        ValidationGroup="g" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td style="width: 80px">
                    户主姓名:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtUserBankName" runat="server" Width="180px"></asp:TextBox></td>
                <td>
                    <span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="RFV_UserBankName"
                        runat="server" ControlToValidate="txtUserBankName" Display="Dynamic" ErrorMessage="必填字段"
                        ValidationGroup="g" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td style="width: 80px">
                    毛 &nbsp;&nbsp; 额:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtMaoMoney" runat="server" Width="180px" onpropertychange="jisuan()">0</asp:TextBox></td>
                <td>
                    <asp:CustomValidator ID="CustomValidator2" runat="server" ClientValidationFunction="CheckCount"
                        ControlToValidate="txtMaoMoney" Display="Dynamic" SetFocusOnError="True" ValidateEmptyText="True"
                        ValidationGroup="g"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 80px">
                    手 续 费:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtFei" runat="server"  Width="180px"></asp:TextBox></td>
                <td>
                    <asp:CustomValidator ID="CustomValidator3" runat="server" ClientValidationFunction="CheckCount"
                        ControlToValidate="txtFei" Display="Dynamic" SetFocusOnError="True" ValidateEmptyText="True"
                        ValidationGroup="g"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td>
                    净 &nbsp;&nbsp; 额:
                </td>
                <td style="padding-left: 5px;">
                    <asp:TextBox ID="txtMoney" runat="server" Width="100%"></asp:TextBox>
                </td>
                <td>
                    <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="CheckCount"
                        ControlToValidate="txtMoney" Display="Dynamic" SetFocusOnError="True" ValidateEmptyText="True"
                        ValidationGroup="g"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 80px">
                    备 &nbsp;&nbsp; 注:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:TextBox ID="txtMemo" runat="server" Width="180px" Height="106px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 80px">
                    <span style="font-size:10.5pt;mso-bidi-font-size:11.0pt;
font-family:宋体;mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;
mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri;mso-hansi-theme-font:
minor-latin;mso-bidi-font-family:&quot;Times New Roman&quot;;mso-bidi-theme-font:minor-bidi;
mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA">积分</span>:</td>
                <td style="padding-left: 5px; padding-bottom: 5px; width: 180px">
                    <asp:Label ID="lblAccountMoney" runat="server" Text="Label"><%=AccountMoney%></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr id="shenqing" runat="server">
                <td style="height: 40px">
                </td>
                <td style="padding-left: 5px; padding-top: 5px; height: 40px; text-align: center;">
                    <asp:Button ID="btnShengQing" runat="server" Text="提交申请" OnClick="btnShengQing_Click"
                        ValidationGroup="g" Height="31px" Width="111px" /></td>
                <td style="height: 40px">
                    </td>
            </tr>
            <tr id="shenhe" runat="server">
                <td colspan="3">
                    <asp:Label ID="msg" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
        </table>
        <asp:HiddenField ID="HiddenField1" runat="server" />
        <br />
        <br />
        <table>
            <tr>
                <td style="font-weight: bold; color: white; background-color: #507cd1">
                    提现记录</td>
            </tr>
            <tr>
                <td>
                    <table>
                        <tr>
                            <td>
                                开始日期:</td>
                            <td>
                                <asp:TextBox ID="txtBeginDate" runat="server"></asp:TextBox>
                                <img alt="Select" onclick="popUpCalendar(this,   <%=txtBeginDate.ClientID %>, dateFormat,-1,-1)"
                                    src="../../js/img/calendar.gif" style="cursor: hand" /></td>
                        </tr>
                        <tr>
                            <td>
                                截止日期:</td>
                            <td>
                                <asp:TextBox ID="txtEndDate" runat="server"></asp:TextBox>
                                <img alt="Select" onclick="popUpCalendar(this,   <%=txtEndDate.ClientID %>, dateFormat,-1,-1)"
                                    src="../../js/img/calendar.gif" style="cursor: hand" /></td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <asp:Button ID="btnQuery" runat="server" OnClick="btnQuery_Click" Text="查询" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="GV_TXList" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="id" EmptyDataText="暂无提现申请"
                        ForeColor="#333333" OnPageIndexChanging="GV_TXList_PageIndexChanging" PageSize="15"
                        Width="100%">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="UserID" HeaderText="会员账号" />
                            <asp:BoundField DataField="username" HeaderText="会员昵称" />
                            <asp:TemplateField HeaderText="提现金额($)">
                                <ItemTemplate>
                                    <asp:Label ID="lblCMoney" runat="server" Text='<%# Bind("CMoney", "{0:F2}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="CreateDate" DataFormatString="{0:yyyy-MM-dd}" HeaderText="申请日期" />
                            <asp:BoundField DataField="CurrState" HeaderText="状态" />
                            <asp:BoundField DataField="Operator" HeaderText="审核人" />
                            <asp:BoundField DataField="OperateTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="审核时间"
                                NullDisplayText=" " />
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtnApprove" runat="server" CommandArgument='<%#Eval("ID") %>'
                                        Enabled='<%#Eval("state").ToString().Equals("0") ? true:false %>' OnCommand="lbtnApprove_Command"
                                        Text='<%#Eval("state").ToString().Equals("0") ? "取消":"已审核" %>'></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        <br />
    </div>
    
     <asp:HiddenField ID="hidMiYao" runat="server" />
</asp:Content>
